$(function () {
	jQuery.support.placeholder = false;
	test = document.createElement('input');
	if('placeholder' in test) jQuery.support.placeholder = true;
	if (!$.support.placeholder) {
		$('.field').find ('label').show ();
	}
	$("#login_form").validate({
		ignore:"",
		rules: {
			account: "required",
			password: "required"
		},
		messages: {
			account: "请填写用户名",
			password: "请输入密码"
		},
		errorPlacement: function(error, element) { 
		    if(element.parent().prop("tagName")!="A"){
		    	error.appendTo(element.parent());	
		    	element.parent().addClass("has-error");
		    }else{
		    	error.appendTo(element.parent().parent());
		    }
		}
	});
});